﻿/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("YUIAspNet");

YUIAspNet.LayoutManager = function(element) {
    YUIAspNet.LayoutManager.initializeBase(this, [element]);
}

YUIAspNet.LayoutManager.prototype = {
    initialize: function() {
        YUIAspNet.LayoutManager.callBaseMethod(this, 'initialize');
    },

    initializeYUIControl: function(sender, args) {
          this._yuiControl = new YAHOO.widget.Layout(this.get_ContainerID(), {
            height: this.get_Height(),
            width: this.get_Width(),
            minHeight: this.get_MinHeight(),
            minWidth: this.get_MinWidth(),
            units: this.get_Units()
        });

        this._yuiControl.render();

    },
    get_ContainerID: function() {
        return this._containerID;
    },
    set_ContainerID: function(containerID) {
        this._containerID = containerID;
    },
  
    get_Width: function() {
        return this._width;
    },
    set_Width: function(width) {
        this._width = width;
    },
    
    get_MinWidth: function() {
        return this._minWidth;
    },
    set_MinWidth: function(minWidth) {
        this._minWidth = minWidth;
    },
    
    get_Height: function() {
        return this._height;
    },
    set_Height: function(height) {
        this._height = height;
    },
    
    get_MinHeight: function() {
        return this._minHeight;
    },
    set_MinHeight: function(minHeight) {
        this._minHeight = minHeight;
    },
    
    get_Units: function() {
        return this._units;
    },
    set_Units: function(units) {
        this._units = units;
    }
}

YUIAspNet.LayoutManager.registerClass('YUIAspNet.LayoutManager', YUIAspNet.BaseControl);
